#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <string.h>
void reverse(char* str)
{
	char* left = str;
	char* right = str + strlen(str) - 1;
	int tem = 0;
	while (*left < *right)
	{
		tem = *right;
		*right = *left;
		*left = tem;
		left++;
		right--;

	}
}
int main()
{
	char str[1000] = { 0 };
	while (gets(str))
	{
		reverse(str);
		printf("%s\n ", str);
	}
	return 0;
}